<ul ng-repeat="carType in carTypes">
    <li class="number" style="text-align: center;">
    <button type="button" class="btn btn-lg btn-link button_btn">{{carType.typeName}}</button>
<!--  数量：<br/> --> 
        <input type="hidden"  id="number{{$index+1}}" value="1"  typeId="{{carType.typeId}}"  >
        <hr/>
        <!-- <span id="couponText{{$index+1}}">{{}}<span> -->
    </li>
</ul>
<button type="button" style="text-align: center;" id="car_type_ok" class="btn tc-but" ng-click="yes()">确定选择</button>
<script type="text/javascript">
	
	$(document).on("click", ".number", function () {
		if(!$(".number").children("button").hasClass("btn-primary btn-link")){
			$(".number").children("button").addClass("btn-link");
		}
		
		 if($(this).children("button").hasClass("btn-link")){
		 	$(this).children("button").removeClass("btn-link");
		 	$(".number").children("button").removeClass("btn-primary");
			$(this).children("button").addClass("btn-primary");
		 }
	     else if($(this).children("button").hasClass("btn-primary")){
		 	$(this).children("button").removeClass("btn-primary");
	      	$(this).children("button").addClass("btn-link");
	     }
		 
		 $("#car_type_ok").click();
	})
</script>